-
Notifications
You must be signed in to change notification settings - Fork 47
Feature/anchor regexp #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… output to work with both openssl 1.0 and openssl 1.1 formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty rad. Thanks @jspaleta!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -102,8 +102,8 @@ def run | |||
puts config[:regexp] | |||
# rubocop:disable Style/IfInsideElse | |||
if config[:regexp] | |||
ra = Regexp.new(config[:anchor].to_s) | |||
if data[-1] =~ ra | |||
anchor_regexp = Regexp.new(config[:anchor].to_s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much clearer as to its intent, thank you I know its a bit nit picky...
#71) * Add option to treat anchor as a regexp. Fix parsing of openssl client output to work with both openssl 1.0 and openssl 1.1 formatting * updates to make travis and rubocop happy * Add pure ruby implementation of check-ssl-root-issuer.rb as alternative to check-ssl-anchor.rb * make rubocop happy * add test for check-ssl-root-issuer * update changelog and README with new plugin information * remove files changed in PR #70, unrelated to this new feature * Update logic for validating issuer name format options. Using mixin libraries internal validation for allowed values.
sensu-plugins#71) * Add option to treat anchor as a regexp. Fix parsing of openssl client output to work with both openssl 1.0 and openssl 1.1 formatting * updates to make travis and rubocop happy * Add pure ruby implementation of check-ssl-root-issuer.rb as alternative to check-ssl-anchor.rb * make rubocop happy * add test for check-ssl-root-issuer * update changelog and README with new plugin information * remove files changed in PR sensu-plugins#70, unrelated to this new feature * Update logic for validating issuer name format options. Using mixin libraries internal validation for allowed values.
Pull Request Checklist
Pull request to address failing errors found in the effort in #67
General
Two failing tests
openssl client connection certificate chain formatting has changed betwen openssl 1.0 and openssl 1.1
This causes the anchor test to fail and on examination would cause all anchor checks to fail on hosts using openssel 1.1
the check-ssl-hsts-preloadable.rb warning test no longer works because the online lookup at hstspreload.org has no reliable warning example.
Fix includes.
Misc other changes:
the check-ssl-anchor.rb command
RuboCop passes
Existing tests pass